version: "2"

services:
  nexus:
    image: sonatype/nexus3
    volumes:
      - "nexus-data:/nexus-data"
    ports:
      - "8081:8081"
    networks:
      - nexus

    environment:
      INSTALL4J_ADD_VM_PARAMS: -Xms4200m -Xmx4200m -XX:MaxDirectMemorySize=4g -Djava.util.prefs.userRoot=/nexus-data/javaprefs

volumes:
  nexus-data: {}

networks:
  nexus: